local t = LoadFallbackB();

-- Difficulty readouts

if isDayTime() == 'true' then

	t[#t+1] = Def.ActorFrame {
		LoadActor("_circlebase") .. {
			InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);zoom,0.5;diffusealpha,0.5;x,SCREEN_RIGHT-120+30;y,SCREEN_CENTER_Y+110;);
			OnCommand=cmd(zoom,0.3;diffusealpha,0;sleep,0.5;accelerate,0.4;diffusealpha,1;zoom,0.6;smooth,0.2;zoom,0.5);
			PlayerJoinedMessageCommand=function(self,param)
				if param.Player == PLAYER_2 then
					(cmd(visible,true;zoom,0.3;diffusealpha,0;sleep,0.5;accelerate,0.4;diffusealpha,1;zoom,0.6;smooth,0.2;zoom,0.5))(self);
				end;
			end;
			OffCommand=cmd(decelerate,0.2;zoom,0;diffusealpha,0;);
		};

		LoadActor("_circlebase") .. {
			InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);zoom,0.5;diffusealpha,0.5;x,SCREEN_LEFT+120-30;y,SCREEN_CENTER_Y+110;);
			OnCommand=cmd(zoom,0.3;diffusealpha,0;sleep,0.5;accelerate,0.4;diffusealpha,1;zoom,0.6;smooth,0.2;zoom,0.5);
			PlayerJoinedMessageCommand=function(self,param)
				if param.Player == PLAYER_1 then
					(cmd(visible,true;zoom,0.3;diffusealpha,0;sleep,0.5;accelerate,0.4;diffusealpha,1;zoom,0.6;smooth,0.2;zoom,0.5))(self);
				end;
			end;
			OffCommand=cmd(decelerate,0.2;zoom,0;diffusealpha,0;);
		};
	};
else

t[#t+1] = Def.ActorFrame {
	LoadActor("_nightbase") .. {
		InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);zoom,0.5;diffusealpha,0.5;x,SCREEN_RIGHT-120+30;y,SCREEN_CENTER_Y+110;);
		OnCommand=cmd(zoom,0.3;diffusealpha,0;sleep,0.5;accelerate,0.4;diffusealpha,1;zoom,0.6;smooth,0.2;zoom,0.5);
		PlayerJoinedMessageCommand=function(self,param)
			if param.Player == PLAYER_2 then
				(cmd(visible,true;zoom,0.3;diffusealpha,0;sleep,0.5;accelerate,0.4;diffusealpha,1;zoom,0.6;smooth,0.2;zoom,0.5))(self);
			end;
		end;
		OffCommand=cmd(decelerate,0.2;zoom,0;diffusealpha,0;);
	};

	LoadActor("_nightbase") .. {
		InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);zoom,0.5;diffusealpha,0.5;x,SCREEN_LEFT+120-30;y,SCREEN_CENTER_Y+110;);
		OnCommand=cmd(zoom,0.3;diffusealpha,0;sleep,0.5;accelerate,0.4;diffusealpha,1;zoom,0.6;smooth,0.2;zoom,0.5);
		PlayerJoinedMessageCommand=function(self,param)
			if param.Player == PLAYER_1 then
				(cmd(visible,true;zoom,0.3;diffusealpha,0;sleep,0.5;accelerate,0.4;diffusealpha,1;zoom,0.6;smooth,0.2;zoom,0.5))(self);
			end;
		end;
		OffCommand=cmd(decelerate,0.2;zoom,0;diffusealpha,0;);
	};
};
end;


t[#t+1] = LoadActor("_p1diffpod") .. {
	InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_1);x,SCREEN_LEFT+120-30;y,SCREEN_CENTER_Y+110);
	OnCommand=cmd(zoom,1.1;diffusealpha,0;sleep,0.9;smooth,0.2;diffusealpha,1;zoom,1.0;);
	PlayerJoinedMessageCommand=function(self,param)
		if param.Player == PLAYER_1 then
			(cmd(visible,true;zoom,1.1;diffusealpha,0;sleep,0.9;smooth,0.2;diffusealpha,1;zoom,1.0))(self);
		end;
	end;
	OffCommand=cmd(decelerate,0.2;zoom,0;diffusealpha,0;);
};

t[#t+1] = LoadActor("_p2diffpod") .. {
	InitCommand=cmd(visible,GAMESTATE:IsHumanPlayer(PLAYER_2);x,SCREEN_RIGHT-120+30;y,SCREEN_CENTER_Y+110;);
	OnCommand=cmd(zoom,1.1;diffusealpha,0;sleep,0.9;smooth,0.2;diffusealpha,1;zoom,1.0;);
	PlayerJoinedMessageCommand=function(self,param)
		if param.Player == PLAYER_2 then
			(cmd(visible,true;zoom,1.1;diffusealpha,0;sleep,0.9;smooth,0.2;diffusealpha,1;zoom,1.0))(self);
		end;
	end;
	OffCommand=cmd(decelerate,0.2;zoom,0;diffusealpha,0;);
};

-- Name That Tune!
t[#t+1] = LoadFont("_troika 24px") .. {
          InitCommand=cmd(x,SCREEN_CENTER_X-30;y,SCREEN_CENTER_Y-65+67;maxwidth,300;horizalign,left;zoom,0.5;visible,not GAMESTATE:IsCourseMode(););
		  OnCommand=function(self)
				if GAMESTATE:IsExtraStage() == true then
					self:diffuse(color("#FFCF6A")):strokecolor(color("#000000"));
					else
						if isDayTime() == 'true' then
							self:diffuse(color("#5A292C"));
							else
							self:diffuse(color("#FFAA12"));
						end
					end
				end;
		  OffCommand=cmd(decelerate,0.3;diffusealpha,0;addx,10;);
          CurrentSongChangedMessageCommand=cmd(finishtweening;playcommand,"Set");
          CurrentCourseChangedMessageCommand=cmd(finishtweening;playcommand,"Set");
          ChangedLanguageDisplayMessageCommand=cmd(finishtweening;playcommand,"Set");
          SetCommand=function(self)
               local song = GAMESTATE:GetCurrentSong();
               if song then
					self:smooth(0.2);
					self:diffusealpha(0);
					self:addx(10);
                    self:settext(song:GetGenre()); 
                    self:playcommand("Refresh");
					(cmd(stoptweening;addx,-6;diffusealpha,0.0;smooth,0.2;addx,6;diffusealpha,1))(self)
				else
					self:settext("");
					self:playcommand("Refresh");
               end
          end;
};

t[#t+1] = LoadFont("Common normal") .. {
          InitCommand=cmd(x,SCREEN_CENTER_X-30;y,SCREEN_CENTER_Y-45+67;maxwidth,270;horizalign,left;visible,not GAMESTATE:IsCourseMode(););
		  OffCommand=cmd(decelerate,0.3;diffusealpha,0;addx,10;);
		  OnCommand=function(self)
				if GAMESTATE:IsExtraStage() == true then
					self:diffuse(color("#FFA029")):strokecolor(color("#000000"));
					else
						if isDayTime() == 'true' then
							self:diffuse(color("#5A292C")):strokecolor(color("#5A292C"));
							else
							self:diffuse(color("#FF674A")):strokecolor(color("#FF137D"));
						end
					end
				end;
          CurrentSongChangedMessageCommand=cmd(finishtweening;playcommand,"Set");
          CurrentCourseChangedMessageCommand=cmd(finishtweening;playcommand,"Set");
          ChangedLanguageDisplayMessageCommand=cmd(finishtweening;playcommand,"Set");
          SetCommand=function(self)
               local song = GAMESTATE:GetCurrentSong();
               if song then
					self:smooth(0.2);
					self:diffusealpha(0);
					self:addx(10);
                    self:settext(song:GetDisplayFullTitle());
                    self:playcommand("Refresh");
					(cmd(stoptweening;addx,-6;diffusealpha,0.0;smooth,0.2;addx,6;diffusealpha,1))(self)
				else
					self:settext("");
					self:playcommand("Refresh");
               end
          end;
};

t[#t+1] = LoadFont("Common normal") .. {
          InitCommand=cmd(x,SCREEN_CENTER_X-30;y,SCREEN_CENTER_Y-22+67;maxwidth,390;horizalign,left;zoom,0.6;visible,not GAMESTATE:IsCourseMode(););
		  OnCommand=function(self)
				if GAMESTATE:IsExtraStage() == true then
					self:diffuse(color("#FFCF6A")):strokecolor(color("#000000"));
					else
						if isDayTime() == 'true' then
							self:diffuse(color("#5A292C"));
							self:strokecolor(color("#5A292C"));
							else
							self:diffuse(color("#FFAA12"));
							self:strokecolor(color("#FFD34A"));
						end
					end
				end;
		  OffCommand=cmd(decelerate,0.3;diffusealpha,0;addx,10;);
          CurrentSongChangedMessageCommand=cmd(finishtweening;playcommand,"Set");
          CurrentCourseChangedMessageCommand=cmd(finishtweening;playcommand,"Set");
          ChangedLanguageDisplayMessageCommand=cmd(finishtweening;playcommand,"Set");
          SetCommand=function(self)
               local song = GAMESTATE:GetCurrentSong();
               if song then
					self:smooth(0.2);
					self:diffusealpha(0);
					self:addx(10);
                    self:settext(song:GetDisplayArtist());
                    self:playcommand("Refresh");
					(cmd(stoptweening;addx,-6;diffusealpha,0.0;smooth,0.2;addx,6;diffusealpha,1))(self)
				else
					self:settext("");
					self:playcommand("Refresh");
               end
          end;
};

t[#t+1] = StandardDecorationFromFileOptional("DifficultyList","DifficultyList");
t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");


t[#t+1] = LoadFont("_troika 24px") .. {
          InitCommand=cmd(zoom,0.8;x,SCREEN_CENTER_X;y,SCREEN_BOTTOM-25;uppercase,true;maxwidth,SCREEN_WIDTH;diffuse,color("#FFFFFF"););
		  OnCommand=cmd(diffusealpha,0;sleep,0.5;smooth,0.3;diffusealpha,1;);
		  OffCommand=cmd(decelerate,0.3;diffusealpha,0;zoomy,0;);
          SortOrderChangedMessageCommand=cmd(playcommand,"Set");
          ChangedLanguageDisplayMessageCommand=cmd(playcommand,"Set");
          SetCommand=function(self)
               local sortorder = GAMESTATE:GetSortOrder();
               if sortorder then
					self:finishtweening();
					self:smooth(0.4);
					self:diffusealpha(0);
					self:addx(6);
                    self:settext(SortOrderToLocalizedString(sortorder));
                    self:playcommand("Refresh");
					(cmd(stoptweening;diffusealpha,0.0;zoomx,0;smooth,0.35;zoomx,.8;diffusealpha,1))(self)
				else
					self:settext("");
					self:playcommand("Refresh");
               end
          end;
};


return t